Skip to content

doc: update Bitcoin Core version references and remove outdated comments#80

Merged
Sjors merged 2 commits intostratum-mining:masterfrom
xyephy:2026/01/update-v30-comments
Feb 16, 2026
Merged

doc: update Bitcoin Core version references and remove outdated comments#80
Sjors merged 2 commits intostratum-mining:masterfrom
xyephy:2026/01/update-v30-comments

Conversation

@xyephy
Copy link
Copy Markdown
Contributor

@xyephy xyephy commented Jan 19, 2026

  • Update minimum required Bitcoin Core version from v30.0 to v30.2
  • Update interruptWait() comment to be version-agnostic since v30.2 now implements it
  • Remove outdated comment about IPC bypassing blockreservedweight minimum enforcement (no longer accurate)

@xyephy xyephy force-pushed the 2026/01/update-v30-comments branch from 1a1a57d to 26483dd Compare January 19, 2026 13:20
} catch (const ipc::Exception& e) {
// Bitcoin Core v30 does not yet implement interruptWait(), fall back
// to just waiting until waitNext() returns.
// Older Bitcoin Core versions may not implement interruptWait(),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we declare that v30.2 is the minimum version, then we should drop this exception handling entirely. Or we could keep it just in case, but the comment should make that more clear.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes we can drop it and add more detailed comments to remove confusion.

@xyephy xyephy force-pushed the 2026/01/update-v30-comments branch 2 times, most recently from ebcc647 to 6cb2743 Compare January 23, 2026 08:11
@Sjors
Copy link
Copy Markdown
Collaborator

Sjors commented Jan 27, 2026

Thanks. Can you split the PR into two commits, one that changes the code and a second that updates the documentation?

t.second.second->interruptWait();
}
} catch (const ipc::Exception& e) {
// Bitcoin Core v30 does not yet implement interruptWait(), fall back
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the commit message for the first commit, it's good to mention that interrupteWait() was added to Bitcoin Core v30.1 in bitcoin/bitcoin#33609

@Sjors
Copy link
Copy Markdown
Collaborator

Sjors commented Feb 10, 2026

@xyephy do you have time to split the commit in the next few days?

@xyephy
Copy link
Copy Markdown
Contributor Author

xyephy commented Feb 10, 2026

@xyephy do you have time to split the commit in the next few days?

yes, will split it and push. Thank you

interruptWait() was added to Bitcoin Core v30.1 in
bitcoin/bitcoin#33609. Since v30.2 is the minimum required
version, the fallback for missing interruptWait() is no
longer needed.
Update README.md and doc/stratum-v2.md to reflect that
Bitcoin Core v30.2 is the minimum required version.
@xyephy xyephy force-pushed the 2026/01/update-v30-comments branch from 6cb2743 to 1bed3b0 Compare February 11, 2026 20:36
@xyephy
Copy link
Copy Markdown
Contributor Author

xyephy commented Feb 11, 2026

@Sjors I noticed merged commit 266127d, the comment says "Bitcoin Core enforces a minimum block reserved weight of 2000" but std::min picks the smaller of 2000 and the calculated value - meaning it caps at 2000 instead of enforcing a floor of 2000. If the intent is to ensure the weight is never below 2000, it should be std::max.

Sjors added a commit to Sjors/sv2-tp that referenced this pull request Feb 16, 2026
Use std::max so block_reserved_weight enforces the 2000 weight
minimum rather than capping at 2000.

Add a focused regression test that covers the floor behavior and
documents the min-vs-cap failure mode.

Reported by xyephy:
stratum-mining#80 (comment)

Assisted-by: OpenAI GPT-5.3-Codex
@Sjors
Copy link
Copy Markdown
Collaborator

Sjors commented Feb 16, 2026

Oops, fixed in #82.

@Sjors Sjors merged commit e714529 into stratum-mining:master Feb 16, 2026
19 checks passed
Sjors added a commit to Sjors/sv2-tp that referenced this pull request Feb 16, 2026
Use std::max so block_reserved_weight enforces the 2000 weight
minimum rather than capping at 2000.

Add a focused regression test that covers the floor behavior and
documents the min-vs-cap failure mode.

Reported by xyephy:
stratum-mining#80 (comment)

Assisted-by: OpenAI GPT-5.3-Codex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants